testing for loop in angular